<template>
	<h3>MyRight组件</h3>
	<h2>引入src/assets目录的图片</h2>
	<img :src="img2" class="img-thumbnail" alt="" />
</template>

<script setup>
	import { onActivated, onDeactivated, onMounted, onUnmounted, ref } from 'vue';
	//用import导入图片
	import img2 from '../assets/2.png'
	onActivated(()=>{
		console.log('MyRight组件被激活了')
	})
	onDeactivated(()=>{
		console.log('MyRight组件被缓存了')
	})
</script>

<style scoped>
</style>